import numpy as np

# true选第一个，false选第二个
arr1 = np.array([1, 2, 5])
arr2 = np.array([4, 7, 1])
con = np.array([True, False, False])
print(np.where(con, arr1, arr2))
